<%--
  Created by IntelliJ IDEA.
  User: tangyubin
  Date: 15-3-4
  Time: 下午7:11
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>老师信息</title>
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/bootstrap.css">
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/bootstrap-theme.css">
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/admin.css">
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/bootstrap.js"></script>
</head>
<body style="background:transparent">
<div class="container">
    <div class="row" style="padding-bottom: 30px">
        <table class="table table-bordered opacity">
            <tr>
                <th>用户名</th>
                <th>密码</th>
                <th>邮箱</th>
                <th>操作</th>
            </tr>
            <s:iterator value="pageBean.list">
            <tr>
                <td><a href="showTeacherInfoPage.action?id=<s:property value="id"/>" ><s:property value="username"/></a></td>
                <td><s:property value="password"/></td>
                <td><s:property value="email"/></td>
                <td><a href="deleteTeacher.action?id=<s:property value="id"/>" ><button class="btn btn-sm btn-info">删除此账户</button></a></td>
            </tr>
            </s:iterator>
        </table>
        <table>
        	<tr>  
                <td>  
                </td>  
                <td>  
                <s:if test="%{pageBean.currentPage == 1}">     
　　　　　　                              首页      上一页 
　　　　                                       </s:if>  
              	<s:else>  
               	<a href="getTeacherInfoPage.action?page=1"><button class="btn btn-info text-center pull-left" >首页</button></a>  
             	<a href="getTeacherInfopage.action?page=<s:property value="%{pageBean.currentPage-1}"/>" ><button class="btn btn-info text-center pull-left">上一页</button></a>  
  				</s:else>  
                </td>  
                <td>  
                <s:if test="%{pageBean.currentPage != pageBean.totalPage && pageBean.totalPage != 0}" >  
                <a  href="getTeacherInfoPage.action?page=<s:property value="%{pageBean.currentPage+1}"/>" ><button class="btn btn-info text-center pull-left">下一页</button></a>  
                <a  href="getTeacherInfoPage.action?page=<s:property value="pageBean.totalPage"/>" ><button class="btn btn-info text-center pull-left">尾页</button></a>  
                </s:if>  
               	<s:else>   
　　　　　　                             下一页  尾页   
　　　　                                      </s:else>  
                </td>  
  				<td>  
                <div align="center">  
                                                            页次  
                <s:property value="pageBean.currentPage" />/<s:property value="pageBean.totalPage" />  
                                                         共  <s:property value="pageBean.allRow" />记录  
                </div>  
                <div align="center"></div>  
                </td>  
             </tr>
        </table>
    </div>
    <div class="row">
        <form class = "form-horizontal" action="addTeacher" method="post">
            <div class="form-group">
                <input type="username" name="username" class="form-control opacity" id="username" placeholder="请输入用户名"/>
            </div>
            <div class="form-group">
                <input type="password" name="password" class="form-control opacity" id="password" placeholder="请输入密码"/>
            </div>
            <div class="form-group">
                <input type="email" name="email" class="form-control opacity" id="email" placeholder="请输入邮箱">
            </div>
            <button type="submit" class="btn btn-info">添加账户</button>
            <button type="reset" class="btn btn-info pull-right">重置</button>
        </form>
        <div class="message">
        	${requestScope.message }
        </div>
    </div>
</div>
</body>
</html>
